/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entitytablemode;

import entity.Employee;
import java.util.ArrayList;
import javax.swing.table.AbstractTableModel;
import manager.managerEmployee;

/**
 *
 * @author NgocNam
 */
public class EmployeeTableModelForInformation_Idle_timeout extends AbstractTableModel{
        manager.managerEmployee me;
        
        public EmployeeTableModelForInformation_Idle_timeout(managerEmployee me){
           this.me=me;
        }
    @Override
    public int getRowCount() {
        return me.getSize();
    }

    @Override
    public int getColumnCount() {
        return 2;
    }

    @Override
    public Object getValueAt(int row, int cloumn) {
        Employee e=me.getEmployee(row);
        switch(cloumn){
            case 0:return e.getEmployeeID();
            case 1:return e.getEmployeeName();
              default: return null;        
        }
    }
    public String getColumnName(int column) {
        switch(column){
            case 0: return "Order ID";
            case 1: return "Employee Name";
           
                default:return  null;
        }
    }
}
